#include <stdio.h>

unsigned int sum_of_squares(unsigned int number) {
    unsigned int result = 0;
    for (unsigned int i = 0; i <= number; i++){
        result += number * number;
    }
    return result;
}
unsigned int square_of_sum(unsigned int number) {
    unsigned int result = 0;
    for (unsigned int i = 0; i <= number; i++){
        result += number;
    }
    return result * result;
}
unsigned int difference_of_squares(unsigned int number){
    return square_of_sum(number) - sum_of_squares(number);
}

int main(){
    unsigned int number;
    printf("Enter a number:\n");
    int result = scanf("%u", &number);
    if (result){
        printf("difference of squares of %u is %u.\n", number, difference_of_squares(number));
    } else {
        printf("Error reading the number.\n");
    }
    return 0;
}